import request from '@/utils/request'

const api = {
  queryTemp: '/kc_print_temp/get_print_template_page',
  addPrintTemp: '/kc_print_temp/add_print_template',
  editPrintTemp: '/kc_print_temp/edit_print_template',
  removePrintTemp: '/kc_print_temp/remove_print_template',
}

export function queryTemp(data) {
  return request({
    url: api.queryTemp,
    method: 'post',
    data,
  })
}
export function addPrintTemp(data) {
  return request({
    url: api.addPrintTemp,
    method: 'post',
    data,
  })
}

export function editPrintTemp(data) {
  return request({
    url: api.editPrintTemp,
    method: 'post',
    data,
  })
}

export function removePrintTemp(pkPrintTemplate) {
  return request({
    url: `${api.removePrintTemp}?pkPrintTemplate=${pkPrintTemplate}`,
    method: 'get',
  })
}
